package cn.ecut.dzy.locks;

/**
 * @program: juc
 * @description:从字节码角度分析synchronized实现
 * @author: DingZhenYun
 * @create: 2021-10-24 19:19
 **/

public class LockByteCodeDemo {

    final Object object = new Object();



    public void m1()
    {
        synchronized (object){
            System.out.println("----------hello sync");
            throw new RuntimeException("----ex");
        }
    }

    public static synchronized void m2()
    {

    }

    public static void main(String[] args) {

    }
}
